package com.dodoke.domain;

import com.dodoke.common.annotation.Excel;
import com.dodoke.common.core.domain.BaseEntity;
import com.dodoke.validateGroup.OnAdd;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 【详细二维码】对象 wx_detail_qr
 * 
 * @author dodoke
 * @date 2020-08-25
 */
@ApiModel("二维码实体类")
public class WxDetailQr extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @Null(groups = {OnAdd.class})
    private Long id;

    /** 一类二维码对应的组编号 */
    @Excel(name = "一类二维码对应的组编号")
    @ApiModelProperty("一类二维码对应的组编号")
    @NotBlank(groups = {OnAdd.class})
    private String code;

    /** 二维码对应图片的url */
    @Excel(name = "二维码对应图片的url")
    @Null(groups = {OnAdd.class})
    private String imageUrl;

    /** 扫码次数 */
    @Excel(name = "扫码次数")
    private Integer count;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setCount(Integer count)
    {
        this.count = count;
    }

    public Integer getCount() 
    {
        return count;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("levelOneId", getCode())
            .append("count", getCount())
            .toString();
    }
}
